<?php if(!defined('ARCH_ROOT_PATH')) exit;
/**
 *	Architect Framework
 *
 *	Architect Framework is a light weight object oriented web applications framework written for PHP 5.1.4 and later that provide the tools to develop and deploy a website or application fast and with as little code as possible.
 *
 *	@author Robin Grass, <hello@coffinboy.se>
 *	@link http://architect.kodlabbet.net
 *	@license http://www.opensource.org/licenses/gpl-3.0.html GNU General Public License (v. 3)
 */

/**
 *	Architect_Request
 *
 *	Simple request handling class.
 *
 *	@package Utilities
 *	@version 1.0
 *	@author Robin Grass, <hello@coffinboy.se>
 */
class Architect_Request {
	
	/**
	 *	isGet
	 *
	 *	Tests if a $_GET is present.
	 *
	 *	@return bool
	 */
	public static function isGet() {
		if(!empty($_GET))
			return true;
	return false;
	}
	
	/**
	 *	isPost
	 *
	 *	Tests if a $_POST is present.
	 *
	 *	@return bool
	 */
	public static function isPost() {
		if(!empty($_POST))
			return true;
	return false;
	}

	/**
	 *	isAjax
	 *
	 *	Tests if the request is an AJAX request.
	 *
	 *	@return bool
	 */
	public static function isAjax() {
		if(!empty($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest')
			return true;
	return false;
	}

}
?>